package com.qingcheng.consumer;


import com.qingcheng.service.goods.SpuPut;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageListener;
import org.springframework.beans.factory.annotation.Autowired;


/**
 * @author shenwei
 * 生成商品上架详情页 监听类
 */
public class MessageConsumerPut implements MessageListener {

    @Autowired
    private SpuPut spuPut;

    @Override
    public void onMessage(Message message) {
        String spuId = new String(message.getBody());
        spuPut.put(spuId);
    }
}
